package com.stu.service.impl;

import com.stu.Pojo.Shop;
import com.stu.mapper.ShopMapper;
import com.stu.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class ShopServiceiml implements ShopService {
@Autowired
    //注入
private ShopMapper  shopMapper;
    @Override
    public List<Shop> selectALL() {
               return shopMapper.selectALL();
    }

    @Override
    public Shop selectByid(Long id) {
        return shopMapper.selectByid(id);
    }
    @Override
    public void insert(Shop shop) {
shopMapper.insert(shop);
    }

    @Override
    public void update(Shop shop) {
shopMapper.update(shop);
    }

    @Override
    public void delete(Long id) {
shopMapper.delete(id);
    }

    public void batchRemove(List<Long> ids) {
        shopMapper.batchReomve(ids);
    }
}
